package com.fowo.api.flow.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @fileName: WorkFlow
 * @Description: 代码目的，作用，如何工作
 * @Author: pzh
 * @Date: 2023/4/19 0019 16:18
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "work_flow")
public class WorkFlow {


    /**
     * 工作流id
     */
    @TableId
    @TableField(value = "`wf_id`")
    @Schema(title = "工作流id")
    private String wfId;

    /**
     * 业务id
     */
    @TableField(value = "`record_id`")
    @Schema(title = "业务id")
    private Long recordId;

    /**
     * 业务表单
     */
    @TableField(value = "`form_name`")
    @Schema(title = "业务表单")
    private String formName;

    /**
     * 钉钉实例id
     */
    @TableField(value = "`process_instance_id`")
    @Schema(title = "钉钉实例id")
    private String processInstanceId;


    /**
     * 钉钉代办任务id
     */
    @TableField(value = "`task_id`")
    @Schema(title = "钉钉代办任务id")
    private Long taskId;


    /**
     * 工作流状态
     */
    @TableField(value = "`wf_status`")
    @Schema(title = "工作流状态")
    private Integer wfStatus;



    /**
     * 创建时间
     */
    @TableField(value = "`create_time`")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(title = "创建时间")
    private java.util.Date createTime;

    /**
     * 创建人
     */
    @TableField(value = "`create_user`")
    @Schema(title = "创建人")
    private Long createUser;

    /**
     * 更新时间
     */
    @TableField(value = "`last_update_time`",fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(title = "更新时间")
    private java.util.Date lastUpdateTime;

    /**
     * 更新人
     */
    @TableField(value = "`last_update_user`")
    @Schema(title = "更新人")
    private Long lastUpdateUser;

    /**
     * 删除标记
     */
    @TableField(value = "`del_flag`")
    @TableLogic
    @Schema(title = "删除标记")
    private Boolean delFlag;

}
